package day3_homework;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;

/*6月的第3个星期日是父亲节，由用户输入年份，算出该年的父亲节是哪一天*/
public class _7 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        Calendar inst = Calendar.getInstance();

        int a=in.nextInt();
        SimpleDateFormat aa = new SimpleDateFormat("yyy年MM月dd号E");

        inst.set(Calendar.YEAR,a);
        inst.set(Calendar.MONTH,5);
        int b=1;
        for (int i = 0; i < 31; i++) {
            if (inst.get(Calendar.DAY_OF_WEEK)== 1){
                b++;
                if (b==3){
                    System.out.println(aa.format(inst.getTime()));
                }
            }
            inst.set(Calendar.DATE,inst.get(Calendar.DATE)+1);
        }
    }
}
